package cc.git.liuyan.customeraiagent.core.embeddingmodel;

import io.milvus.grpc.PlaceholderType;
import io.milvus.v2.service.vector.request.data.BaseVector;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;

public class BigDecimalVec implements BaseVector {
    private final List<Float> data;

    public BigDecimalVec(List<BigDecimal> data) {
        this.data = new ArrayList();
        for (BigDecimal bigDecimal : data) {
            this.data.add(bigDecimal.floatValue());
        }
    }

    public BigDecimalVec(BigDecimal[] data) {
        this.data = new ArrayList();
        for (BigDecimal bigDecimal : data) {
            this.data.add(bigDecimal.floatValue());
        }
    }

    public PlaceholderType getPlaceholderType() {
        return PlaceholderType.FloatVector;
    }

    public Object getData() {
        return this.data;
    }
}
